package com.ke.forum.forumapi.service.impl;

import com.ke.forum.common.common.Result;
import com.ke.forum.mbg.entity.Sort;
import com.ke.forum.mbg.dao.SortMapper;
import com.ke.forum.forumapi.service.SortService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ke.forum.mbg.entity.dto.SortDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 珂
 * @since 2021-05-22
 */
@Service
public class SortServiceImpl extends ServiceImpl<SortMapper, Sort> implements SortService {

    @Autowired
    SortMapper sortMapper;

    @Override
    public Result listSortAndSection() {
        List<SortDto> sortDtos = sortMapper.listSortAndSection();
        return Result.SUCCESS(sortDtos);
    }
}
